<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

var students ={number:1001, name:'jack', score:98,gender:'男'}
            
/*
如果对象属性名是变量表示时，使用:对象名[变量名]访问属悝值*/
for(var a in students){
console.log(a+':'+students[a])
}

    </script>
</body>
</html>